package com.zb.entity.dto;

import com.zb.utils.VerificUtil;
import com.zb.validation.AddValidation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @Author WEN
 * @Date 2023/7/7 0007
 **/
@Data
@ApiModel(value = "注册账号实体对象")
public class AccountDto {
    @Pattern(regexp = VerificUtil.REGEX_PHONE, groups = {AddValidation.class})
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;
    @NotBlank(message = "登录密码不能为空", groups = {AddValidation.class})
    @ApiModelProperty(value = "登录密码", required = true)
    private String password;
    @NotBlank(message = "用户名称不能为空", groups = {AddValidation.class})
    @Length(max = 100, message = "用户名称字符长度限制在100个以内", groups = {AddValidation.class})
    @ApiModelProperty(value = "用户名称", required = true)
    private String name;
    @Length(max = 100, message = "昵称字符长度限制在100个以内", groups = {AddValidation.class})
    @ApiModelProperty(value = "昵称")
    private String nickName;
}
